local boqvshou = fk.CreateSkill {
  name = "boqvshou",
}

Fk:loadTranslationTable{
  ["boqvshou"] = "取首",
  [":boqvshou"] = "当你使用锦囊牌结算结束后，你可以令你当前手牌中的所有伤害牌的伤害基数+1直到回合结束。",

  ["#boqvshou-invoke"] = "取首：令当前手牌中的伤害牌伤害+1直到回合结束！",
  ["@boqvshou-inhand-turn"] = "伤害+",
   
  ["$boqvshou1"] = "皆言江东多才俊，闻吾入吴亦夜啼!",
  ["$boqvshou2"] = "闻吾之名讳，江东小儿无不惧而止啼!"
}

boqvshou:addEffect(fk.CardUseFinished, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and data.card.type == Card.TypeTrick and player:hasSkill(boqvshou.name)
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askToSkillInvoke(player, {
      skill_name = boqvshou.name,
      prompt = "#boqvshou-invoke",
    })
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    for _, id in ipairs(player:getCardIds("h")) do
      local card = Fk:getCardById(id)
      if card.is_damage_card then
        room:addCardMark(card, "@boqvshou-inhand-turn")
      end
    end
  end,
})

boqvshou:addEffect(fk.PreCardUse, {
  can_refresh = function (self, event, target, player, data)
    return target == player and data.card:getMark("@boqvshou-inhand-turn") > 0
  end,
  on_refresh = function (self, event, target, player, data)
    data.additionalDamage = (data.additionalDamage or 0) + data.card:getMark("@boqvshou-inhand-turn")
  end,
})

return boqvshou